import axios from "axios";
import { ref } from "vue";

let d1 = ref([]);
let d2 = ref([]);
let d3 = ref([]);
let d4 = ref([]);
let d5 = ref([]);
let d6 = ref([]);
let d7 = ref([]);
let d8 = ref([]);
let d9 = ref([]);
let d10 = ref([]);
let d11 = ref([]);
let d12 = ref([]);
let d13 = ref([]);
let d14 = ref([]);
let d15 = ref([]);
let d16 = ref([]);
let d17 = ref([]);
let d18 = ref([]);
let d19 = ref([]);
let d20 = ref([]);
let d21 = ref([]);
let d22 = ref([]);
let d23 = ref([]);
export const createDic = async () => {
  d1.value = await dictionary("TGRegion");
  d2.value = await dictionary("FType");
  d3.value = await dictionary("NeedChannel");
  d4.value = await dictionary("Groupid");
  d5.value = await dictionary("CustGroupType");
  d6.value = await dictionary("ProdType");
  d7.value = await dictionary("RateAll");
  d8.value = await dictionary("YJBM");
  d9.value = await dictionary("QYType");
  d10.value = await dictionary("TermSaleType");
  d11.value = await dictionary("DiscType");
  d12.value = await dictionary("DiscZK");
  d13.value = await dictionary("CXType");
  d14.value = await dictionary("ProdSelect");
  d15.value = await dictionary("ConditionType");
  d16.value = await dictionary("RetainFee");
  d17.value = await dictionary("ProdStar");
  d18.value = await dictionary("ForbidRec");
  d19.value = await dictionary("TackOutType");
  d20.value = await dictionary("SmsArea");
  d21.value = await dictionary("RecAffect");
  d22.value = await dictionary("DefAffect");
  d23.value = await dictionary("CanAffect");
};
const dictionary = async (id) => {
  const resp = await axios({
    method: "post",
    url: "/api/text/dist",
    data: {
      templateName: "【政企】营销资费申请模板（促销类）",
      tagCode: id,
    },
  });
  const {
    data: { data },
  } = resp;
  return data;
};
export const config1 = ref([
  {
    label: "产品编码",
    field: "prodId",
    component: "Input",
    span: 12,
    componentProps: {
      maxlength: 50,
      placeholder: "请输入产品编码",
      style: { width: "100%" },
    },
  },
  {
    label: "是否包含流量资源",
    field: "ISFlow",
    component: "Select",
    span: 12,
    componentProps: {
      maxlength: 50,
      placeholder: "请选择是否包含流量资源",
      style: { width: "100%" },
      options: [
        { label: "是", value: "0" },
        { label: "否", value: "1" },
      ],
    },
  },
  {
    label: "产品名称",
    field: "prodName",
    component: "Input",
    span: 12,
    componentProps: {
      maxlength: 50,
      placeholder: "",
      style: { width: "100%" },
    },
  },
  {
    label: "推广地区",
    field: "TGRegion",
    component: "Select",
    span: 12,
    componentProps: {
      maxlength: 50,
      placeholder: "请选择推广地区",
      style: { width: "100%" },
      options: d1,
    },
  },
  {
    label: "方案类型",
    field: "FType",
    component: "Select",
    span: 12,
    componentProps: {
      maxlength: 50,
      placeholder: "请选择方案类型",
      style: { width: "100%" },
      options: d2,
    },
  },
  {
    label: "活动开始时间",
    field: "StartDate",
    component: "DatePicker",
    span: 12,
    componentProps: {
      maxlength: 50,
      placeholder: "请选择活动开始时间",
      style: { width: "100%" },
      shortcuts: [
        {
          text: "Today",
          value: new Date(),
        },
        {
          text: "Yesterday",
          value: () => {
            const date = new Date();
            date.setDate(date.getDate() - 1);
            return date;
          },
        },
        {
          text: "A week ago",
          value: () => {
            const date = new Date();
            date.setDate(date.getDate() - 7);
            return date;
          },
        },
      ],
    },
  },
  {
    label: "活动结束时间",
    field: "EndDate",
    component: "DatePicker",
    span: 12,
    componentProps: {
      maxlength: 50,
      placeholder: "请选择活动结束时间",
      style: { width: "100%" },
      shortcuts: [
        {
          text: "Today",
          value: new Date(),
        },
        {
          text: "Yesterday",
          value: () => {
            const date = new Date();
            date.setDate(date.getDate() - 1);
            return date;
          },
        },
        {
          text: "A week ago",
          value: () => {
            const date = new Date();
            date.setDate(date.getDate() - 7);
            return date;
          },
        },
      ],
    },
  },
  {
    label: "支撑方式",
    field: "AddType",
    component: "RadioGroup",
    span: 12,
    componentProps: {
      maxlength: 50,
      style: { width: "100%" },
      options: [
        { label: "产品方式", value: "ProdType_Person" },
        { label: "活动方式", value: "RewardActivity" },
      ],
    },
  },
  {
    label: "是否总部统一需求",
    field: "IsJTReq",
    component: "RadioGroup",
    span: 12,
    componentProps: {
      maxlength: 50,
      style: { width: "100%" },
      options: [
        { label: "是", value: "0" },
        { label: "否", value: "1" },
      ],
    },
  },
  {
    label: "需承载渠道",
    field: "NeedChannel",
    component: "Select",
    span: 12,
    componentProps: {
      maxlength: 50,
      style: { width: "100%" },
      multiple: true,
      placeholder: "请选择需承载渠道",
      options: d3,
    },
  },
  {
    label: "是否限定工号组受理",
    field: "IsGroup",
    component: "RadioGroup",
    span: 12,
    componentProps: {
      maxlength: 50,
      style: { width: "100%" },
      options: [
        { label: "是", value: "0" },
        { label: "否", value: "1" },
      ],
    },
  },
  {
    label: "工号组选择",
    field: "Groupid",
    component: "Select",
    span: 12,
    componentProps: {
      maxlength: 50,
      style: { width: "100%" },
      multiple: true,
      placeholder: "请选择工号组选择",
      options: d4,
    },
  },
  {
    label: "是否限定工号受理",
    field: "IsOper",
    component: "Select",
    span: 12,
    componentProps: {
      maxlength: 50,
      style: { width: "100%" },
      placeholder: "请选择是否限定工号受理",
      options: [
        { label: "是（允许地市维护）", value: "0" },
        { label: "是（仅省维护）", value: "1" },
        { label: "否", value: "2" },
      ],
    },
  },
  {
    label: "受理工号",
    field: "Operator",
    component: "Input",
    span: 12,
    componentProps: {
      maxlength: 50,
      placeholder: "请输入受理工号",
      style: { width: "100%" },
    },
  },
  {
    label: "是否限定目标客户",
    field: "IsCustGroup",
    component: "RadioGroup",
    span: 12,
    componentProps: {
      maxlength: 50,
      style: { width: "100%" },
      options: [
        { label: "是", value: "0" },
        { label: "否", value: "1" },
      ],
    },
  },
  {
    label: "目标客户支撑方式",
    field: "CustGroupType",
    component: "Select",
    span: 12,
    componentProps: {
      maxlength: 50,
      placeholder: "请选择目标客户支撑方式",
      style: { width: "100%" },
      options: d5,
    },
  },
  {
    label: "目标客户列表",
    field: "TargeCustList",
    component: "Input",
    span: 12,
    componentProps: {
      maxlength: 50,
      placeholder: "请输入目标客户列表",
      style: { width: "100%" },
    },
  },
  {
    label: "是否要求合户",
    field: "IsRlaAcct",
    component: "RadioGroup",
    span: 12,
    componentProps: {
      maxlength: 50,
      style: { width: "100%" },
      options: [
        { label: "是", value: "0" },
        { label: "否", value: "1" },
      ],
    },
  },
  {
    label: "产品类型",
    field: "ProdType",
    component: "Select",
    span: 12,
    componentProps: {
      maxlength: 50,
      placeholder: "请选择产品类型",
      style: { width: "100%" },
      options: d6,
    },
  },
  {
    label: "资费归属",
    field: "资费归属",
    component: "Select",
    span: 12,
    componentProps: {
      maxlength: 50,
      placeholder: "请选择资费归属",
      style: { width: "100%" },
      options: d7,
    },
  },
  {
    label: "对应总部一级编码",
    field: "YJBM",
    component: "Select",
    span: 12,
    componentProps: {
      maxlength: 50,
      placeholder: "请选择对应总部一级编码",
      style: { width: "100%" },
      options: d8,
    },
  },
  {
    label: "需求编号",
    field: "demandId",
    component: "Input",
    span: 12,
    componentProps: {
      maxlength: 50,
      placeholder: "请选择需求编号",
      style: { width: "100%" },
    },
  },
  {
    label: "日租计费价格",
    field: "rentPrice",
    component: "Input",
    span: 12,
    componentProps: {
      maxlength: 50,
      placeholder: "请输入日租计费价格",
      style: { width: "100%" },
    },
  },
  {
    label: "是否日租产品",
    field: "isDailyRent",
    component: "RadioGroup",
    span: 12,
    componentProps: {
      maxlength: 50,
      style: { width: "100%" },
      options: [
        { label: "是", value: "1" },
        { label: "否", value: "2" },
      ],
    },
  },
  {
    label: "权益类型",
    field: "QYType",
    component: "Select",
    span: 12,
    componentProps: {
      maxlength: 50,
      placeholder: "请选择权益类型",
      style: { width: "100%" },
      options: d9,
    },
  },
  {
    label: "是否终端活动",
    field: "IsTermSale",
    component: "RadioGroup",
    span: 12,
    componentProps: {
      maxlength: 50,
      style: { width: "100%" },
      options: [
        { label: "是", value: "0" },
        { label: "否", value: "1" },
      ],
    },
  },
  {
    label: "终端活动类型",
    field: "TermSaleType",
    component: "Select",
    span: 12,
    componentProps: {
      maxlength: 50,
      placeholder: "请选择终端活动类型",
      style: { width: "100%" },
      options: d10,
    },
  },
  {
    label: "是否网龄限制",
    field: "是否网龄限制",
    component: "RadioGroup",
    span: 12,
    componentProps: {
      maxlength: 50,
      style: { width: "100%" },
      options: [
        { label: "是", value: "是" },
        { label: "否", value: "否" },
      ],
    },
  },
  {
    label: "网龄限制时长（月）",
    field: "ConTime",
    component: "Input",
    span: 12,
    componentProps: {
      maxlength: 50,
      placeholder: "请输入网龄限制时长（月）",
      style: { width: "100%" },
    },
  },
  {
    label: "优惠模式",
    field: "DiscType",
    component: "Select",
    span: 12,
    componentProps: {
      maxlength: 50,
      placeholder: "请选择优惠模式",
      style: { width: "100%" },
      options: d11,
    },
  },
  {
    label: "折扣类型",
    field: "DiscZK",
    component: "Select",
    span: 12,
    componentProps: {
      maxlength: 50,
      placeholder: "请选择折扣类型",
      style: { width: "100%" },
      options: d12,
    },
  },
  {
    label: "是否需要接盘",
    field: "IsNeedJPnew",
    component: "RadioGroup",
    span: 12,
    componentProps: {
      maxlength: 50,
      style: { width: "100%" },
      options: [
        { label: "是", value: "0" },
        { label: "否", value: "1" },
      ],
    },
  },
  {
    label: "负责部门",
    field: "FZBM",
    component: "Input",
    span: 12,
    componentProps: {
      maxlength: 50,
      placeholder: "请输入负责部门",
      style: { width: "100%" },
    },
  },
  {
    label: "姓名",
    field: "FZNAME",
    component: "Input",
    span: 12,
    componentProps: {
      maxlength: 50,
      placeholder: "请输入姓名",
      style: { width: "100%" },
    },
  },
  {
    label: "电话",
    field: "电话",
    component: "Input",
    span: 12,
    componentProps: {
      maxlength: 50,
      placeholder: "请输入电话",
      style: { width: "100%" },
    },
  },
  {
    label: "邮箱",
    field: "邮箱",
    component: "Input",
    span: 12,
    componentProps: {
      maxlength: 50,
      placeholder: "请输入邮箱",
      style: { width: "100%" },
    },
  },
  {
    label: "促销类型及到期规则",
    field: "CXType",
    component: "Select",
    span: 12,
    componentProps: {
      maxlength: 50,
      placeholder: "请选择促销类型及到期规则",
      style: { width: "100%" },
      options: d13,
    },
  },
  {
    label: "员工是否可办理",
    field: "IsCompAdd",
    component: "RadioGroup",
    span: 12,
    componentProps: {
      maxlength: 50,
      style: { width: "100%" },
      options: [
        { label: "是", value: "是" },
        { label: "否", value: "否" },
      ],
    },
  },
  {
    label: "申请统一产商品编码",
    field: "GOODSID",
    component: "Input",
    span: 12,
    componentProps: {
      maxlength: 50,
      placeholder: "请输入申请统一产商品编码",
      style: { width: "100%" },
    },
  },
]);

export const rules1 = {
  prodId: [
    {
      required: true,
      message: "请输入产品编码",
      trigger: "blur",
    },
  ],
  ISFlow: [
    {
      required: true,
      message: "请输入是否包含流量资源",
      trigger: "blur",
    },
  ],
  prodName: [
    {
      required: true,
      message: "请输入产品名称",
      trigger: "blur",
    },
  ],
  TGRegion: [
    {
      required: true,
      message: "请选择推广地区",
      trigger: "blur",
    },
  ],
  FType: [
    {
      required: true,
      message: "请选择方案类型",
      trigger: "blur",
    },
  ],
  StartDate: [
    {
      required: true,
      message: "请选择活动开始时间",
      trigger: "blur",
    },
  ],
  EndDate: [
    {
      required: true,
      message: "请选择活动结束时间",
      trigger: "blur",
    },
  ],
  AddType: [
    {
      required: true,
      message: "请选择支撑方式",
      trigger: "blur",
    },
  ],
  IsJTReq: [
    {
      required: true,
      message: "请选择是否总部统一需求",
      trigger: "blur",
    },
  ],
  NeedChannel: [
    {
      required: true,
      message: "请选择需承载渠道",
      trigger: "blur",
    },
  ],
  IsGroup: [
    {
      required: true,
      message: "请选择是否限定工号组受理",
      trigger: "blur",
    },
  ],
  Groupid: [
    {
      required: true,
      message: "请选择工号组选择",
      trigger: "blur",
    },
  ],
  Operator: [
    {
      required: true,
      message: "请选择受理工号",
      trigger: "blur",
    },
  ],
  IsCustGroup: [
    {
      required: true,
      message: "请选择是否限定目标客户",
      trigger: "blur",
    },
  ],
  IsRlaAcct: [
    {
      required: true,
      message: "请选择是否要求合户",
      trigger: "blur",
    },
  ],
  产品类型: [
    {
      required: true,
      message: "请选择产品类型",
      trigger: "blur",
    },
  ],
  资费归属: [
    {
      required: true,
      message: "请选择资费归属",
      trigger: "blur",
    },
  ],
  YJBM: [
    {
      required: true,
      message: "请选择对应总部一级编码",
      trigger: "blur",
    },
  ],
  demandId: [
    {
      required: true,
      message: "请选择需求编号",
      trigger: "blur",
    },
  ],
  rentPrice: [
    {
      required: true,
      message: "请输入日租计费价格",
      trigger: "blur",
    },
  ],
  isDailyRent: [
    {
      required: true,
      message: "请选择是否日租产品",
      trigger: "blur",
    },
  ],
  QYType: [
    {
      required: true,
      message: "请选择权益类型",
      trigger: "blur",
    },
  ],
  IsTermSale: [
    {
      required: true,
      message: "请选择是否终端活动",
      trigger: "blur",
    },
  ],
  TermSaleType: [
    {
      required: true,
      message: "请选择终端活动类型",
      trigger: "blur",
    },
  ],
  是否网龄限制: [
    {
      required: true,
      message: "请选择是否网龄限制",
      trigger: "blur",
    },
  ],
  ConTime: [
    {
      required: true,
      message: "请输入网龄限制时长（月）",
      trigger: "blur",
    },
  ],
  DiscType: [
    {
      required: true,
      message: "请选择优惠模式",
      trigger: "blur",
    },
  ],
  DiscZK: [
    {
      required: true,
      message: "请选择折扣类型",
      trigger: "blur",
    },
  ],
  IsNeedJPnew: [
    {
      required: true,
      message: "请选择是否需要接盘",
      trigger: "blur",
    },
  ],
  FZBM: [
    {
      required: true,
      message: "请输入负责部门",
      trigger: "blur",
    },
  ],
  CXType: [
    {
      required: true,
      message: "请选择促销类型及到期规则",
      trigger: "blur",
    },
  ],
  IsCompAdd: [
    {
      required: true,
      message: "请选择员工是否可办理",
      trigger: "blur",
    },
  ],
  GOODSID: [
    {
      required: true,
      message: "请输入申请统一产商品编码",
      trigger: "blur",
    },
  ],
};
export const config2 = ref([
  {
    label: "办理",
    field: "RecAffect",
    component: "Select",
    span: 8,
    componentProps: {
      maxlength: 50,
      placeholder: "请输入办理",
      style: { width: "100%" },
      options: d21,
    },
  },
  {
    label: "默认",
    field: "DefAffect",
    component: "Select",
    span: 8,
    componentProps: {
      maxlength: 50,
      placeholder: "请输入默认",
      style: { width: "100%" },
      options: d22,
    },
  },
  {
    label: "取消",
    field: "CanAffect",
    component: "Select",
    span: 8,
    componentProps: {
      maxlength: 50,
      placeholder: "请输入取消",
      style: { width: "100%" },
      options: d23,
    },
  },
]);
export const rules2 = {
  RecAffect: [
    {
      required: true,
      message: "请选择办理",
      trigger: "blur",
    },
  ],
  DefAffect: [
    {
      required: true,
      message: "请选择默认",
      trigger: "blur",
    },
  ],
  CanAffect: [
    {
      required: true,
      message: "请选择取消",
      trigger: "blur",
    },
  ],
};
export const config3 = ref([
  {
    label: "产品发布",
    field: "ProdSelect",
    component: "Select",
    span: 12,
    componentProps: {
      maxlength: 50,
      placeholder: "请选择产品发布",
      style: { width: "100%" },
      multiple: true,
      options: d14,
    },
  },
]);
export const rules3 = {
  ProdSelect: [
    {
      required: true,
      message: "请选择产品发布",
      trigger: "blur",
    },
  ],
};
export const config4 = ref([
  {
    label: "合约期间是否允许客户申请停机",
    field: "isRetainNum",
    component: "RadioGroup",
    span: 12,
    componentProps: {
      maxlength: 50,
      style: { width: "100%" },
      options: [
        { label: "是", value: "是" },
        { label: "否", value: "否" },
      ],
    },
  },
  {
    label: "合约类型",
    field: "合约类型",
    component: "Select",
    span: 12,
    componentProps: {
      maxlength: 50,
      style: { width: "100%" },
      placeholder: "请选择合约类型",
      options: d15,
    },
  },
  {
    label: "协议期（月）",
    field: "XYQ",
    component: "Input",
    span: 12,
    componentProps: {
      maxlength: 50,
      placeholder: "请选择协议期（月）",
      style: { width: "100%" },
      shortcuts: [
        {
          text: "Today",
          value: new Date(),
        },
        {
          text: "Yesterday",
          value: () => {
            const date = new Date();
            date.setDate(date.getDate() - 1);
            return date;
          },
        },
        {
          text: "A week ago",
          value: () => {
            const date = new Date();
            date.setDate(date.getDate() - 7);
            return date;
          },
        },
      ],
    },
  },
  {
    label: "停机保号收费标准",
    field: "RetainFee",
    component: "Select",
    span: 12,
    componentProps: {
      maxlength: 50,
      style: { width: "100%" },
      placeholder: "请选择停机保号收费标准",
      options: d16,
    },
  },
  {
    label: "是否收取违约金",
    field: "IsAgree",
    component: "RadioGroup",
    span: 12,
    componentProps: {
      maxlength: 50,
      style: { width: "100%" },
      options: [
        { label: "是", value: "是" },
        { label: "否", value: "否" },
      ],
    },
  },
  {
    label: "违约金支付方式",
    field: "违约金支付方式",
    component: "Select",
    span: 12,
    componentProps: {
      maxlength: 50,
      style: { width: "100%" },
      placeholder: "请选择违约金支付方式",
      options: [{ label: "一次性收取", value: "1" }],
    },
  },
  {
    label: "合约期（月）",
    field: "ProdCycle",
    component: "Input",
    span: 12,
    componentProps: {
      maxlength: 50,
      placeholder: "请选择合约期（月）",
      style: { width: "100%" },
      shortcuts: [
        {
          text: "Today",
          value: new Date(),
        },
        {
          text: "Yesterday",
          value: () => {
            const date = new Date();
            date.setDate(date.getDate() - 1);
            return date;
          },
        },
        {
          text: "A week ago",
          value: () => {
            const date = new Date();
            date.setDate(date.getDate() - 7);
            return date;
          },
        },
      ],
    },
  },
  {
    label: "合约星级",
    field: "ProdStar",
    component: "Select",
    span: 12,
    componentProps: {
      maxlength: 50,
      style: { width: "100%" },
      placeholder: "请选择合约星级",
      options: d17,
    },
  },
  {
    label: "违约比例",
    field: "DespPrecent",
    component: "Input",
    span: 12,
    componentProps: {
      maxlength: 50,
      style: { width: "100%" },
      placeholder: "请输入违约比例",
    },
  },
  {
    label: "四项受限业务",
    field: "ForbidRec",
    component: "Select",
    span: 12,
    componentProps: {
      maxlength: 50,
      style: { width: "100%" },
      placeholder: "请选择四项受限业务",
      options: d18,
    },
  },
  {
    label: "携出违约信息选择",
    field: "TackOutType",
    component: "Select",
    span: 12,
    componentProps: {
      maxlength: 50,
      style: { width: "100%" },
      placeholder: "请选择携出违约信息选择",
      options: d19,
    },
  },
  {
    label: "协议消费类违约模板",
    field: "TackOutType3",
    component: "Input",
    span: 24,
    componentProps: {
      maxlength: 50,
      type: "textarea",
      rows: 4,
      style: { width: "100%" },
      placeholder: "请输入协议消费类违约模板",
    },
  },
]);
export const rules4 = {
  TackOutType: [
    {
      required: true,
      message: "请选择提出违约信息选择",
      trigger: "blur",
    },
  ],
  ProdStar: [
    {
      required: true,
      message: "请选择合约星级",
      trigger: "blur",
    },
  ],
  DespPrecent: [
    {
      required: true,
      message: "请输入违约比例",
      trigger: "blur",
    },
  ],
  违约金支付方式: [
    {
      required: true,
      message: "请选择违约金支付方式",
      trigger: "blur",
    },
  ],
  ProdCycle: [
    {
      required: true,
      message: "请输入合约期（月）",
      trigger: "blur",
    },
  ],
};
export const config5_0 = ref([
  {
    label: "是否订购提醒",
    field: "SellSms",
    component: "RadioGroup",
    span: 12,
    componentProps: {
      maxlength: 50,
      style: { width: "100%" },
      placeholder: "请选择是否到期提醒",
      options: [
        { label: "是", value: "0" },
        { label: "否", value: "1" },
      ],
    },
  },
  {
    label: "是否使用标准模板",
    field: "SmsCriter",
    component: "RadioGroup",
    span: 12,
    componentProps: {
      maxlength: 50,
      style: { width: "100%" },
      placeholder: "请选择是否使用标准模板",
      options: [
        { label: "是", value: "是" },
        { label: "否", value: "否" },
      ],
    },
  },
  {
    label: "短信内容",
    field: "SmsContent",
    component: "Input",
    span: 24,
    componentProps: {
      maxlength: 50,
      type: "textarea",
      rows: 4,
      style: { width: "100%" },
      placeholder: "请输入短信内容",
    },
  },
  {
    label: "地市",
    field: "SmsArea",
    component: "Select",
    span: 12,
    componentProps: {
      maxlength: 50,
      style: { width: "100%" },
      placeholder: "请选择地市",
      options: d1,
    },
  },
  {
    label: "短信类型",
    field: "SmsType",
    component: "RadioGroup",
    span: 12,
    componentProps: {
      maxlength: 50,
      style: { width: "100%" },
      placeholder: "请选择是否使用标准模板",
      options: [
        { label: "取消", value: "取消" },
        { label: "开通", value: "开通" },
      ],
    },
  },
  {
    label: "限制产品",
    field: "SmsProd",
    component: "Input",
    span: 12,
    componentProps: {
      maxlength: 50,
      style: { width: "100%" },
      placeholder: "请输入限制产品",
    },
  },
  {
    label: "所属产品",
    field: "SmsProdFlow",
    component: "Input",
    span: 12,
    componentProps: {
      maxlength: 50,
      style: { width: "100%" },
      placeholder: "请输入所属产品",
    },
  },
]);
export const rules5_0 = {
  SmsContent: [
    {
      required: true,
      message: "请输入短信内容",
      trigger: "blur",
    },
  ],
};
export const config5 = ref([
  {
    label: "是否到期提醒",
    field: "IsMaturSms",
    component: "RadioGroup",
    span: 12,
    componentProps: {
      maxlength: 50,
      style: { width: "100%" },
      placeholder: "请选择是否到期提醒",
      options: [
        { label: "是", value: "0" },
        { label: "否", value: "1" },
      ],
    },
  },
  {
    label: "是否使用标准模板",
    field: "SmsMaturCriter",
    component: "RadioGroup",
    span: 12,
    componentProps: {
      maxlength: 50,
      style: { width: "100%" },
      placeholder: "请选择是否使用标准模板",
      options: [
        { label: "是", value: "是" },
        { label: "否", value: "否" },
      ],
    },
  },
  {
    label: "短信内容",
    field: "MaturSmsCont",
    component: "Input",
    span: 24,
    componentProps: {
      maxlength: 50,
      type: "textarea",
      rows: 4,
      style: { width: "100%" },
      placeholder: "请输入短信内容",
    },
  },
  {
    label: "开始时间",
    field: "MaturSmsStart",
    component: "DatePicker",
    span: 12,
    componentProps: {
      maxlength: 50,
      style: { width: "100%" },
      placeholder: "请选择开始时间",
    },
  },
  {
    label: "截止时间",
    field: "MaturSmsEnd",
    component: "DatePicker",
    span: 12,
    componentProps: {
      maxlength: 50,
      style: { width: "100%" },
      placeholder: "请选择截止时间",
    },
  },
  {
    label: "提前几天提醒",
    field: "MaturSmsDays",
    component: "Input",
    span: 12,
    componentProps: {
      maxlength: 50,
      style: { width: "100%" },
      placeholder: "请输入提前几天提醒",
    },
  },
  {
    label: "地市",
    field: "MaturSmsRegion",
    component: "Select",
    span: 12,
    componentProps: {
      maxlength: 50,
      style: { width: "100%" },
      placeholder: "请选择地市",
      options: d1,
    },
  },
  {
    label: "限制产品",
    field: "MaturSmsProd",
    component: "Input",
    span: 12,
    componentProps: {
      maxlength: 50,
      style: { width: "100%" },
      placeholder: "请输入限制产品",
    },
  },
  {
    label: "短信下发时间",
    field: "MaturSmsTime",
    component: "DatePicker",
    span: 12,
    componentProps: {
      maxlength: 50,
      style: { width: "100%" },
      placeholder: "请选择短信下发时间",
    },
  },
]);
export const rules5 = {
  MaturSmsCont: [
    {
      required: true,
      message: "请输入短信内容",
      trigger: "blur",
    },
  ],
};

export const config6 = ref([
  {
    label: "是否二次确认",
    field: "IsConfSms",
    component: "RadioGroup",
    span: 12,
    componentProps: {
      maxlength: 50,
      style: { width: "100%" },
      placeholder: "请选择是否二次确认",
      options: [
        { label: "是", value: "0" },
        { label: "否", value: "1" },
      ],
    },
  },
  {
    label: "是否使用标准模板",
    field: "SmsConfCriter",
    component: "RadioGroup",
    span: 12,
    componentProps: {
      maxlength: 50,
      style: { width: "100%" },
      placeholder: "请选择是否使用标准模板",
      options: [
        { label: "是", value: "0" },
        { label: "否", value: "1" },
      ],
    },
  },
  {
    label: "短信内容",
    field: "ConfSmsCont",
    component: "Input",
    span: 24,
    componentProps: {
      maxlength: 50,
      type: "textarea",
      rows: 4,
      style: { width: "100%" },
      placeholder: "请输入短信内容",
    },
  },
  {
    label: "开始时间",
    field: "开始时间",
    component: "DatePicker",
    span: 12,
    componentProps: {
      maxlength: 50,
      style: { width: "100%" },
      placeholder: "请选择开始时间",
    },
  },
  {
    label: "截止时间",
    field: "截止时间",
    component: "DatePicker",
    span: 12,
    componentProps: {
      maxlength: 50,
      style: { width: "100%" },
      placeholder: "请选择截止时间",
    },
  },
  {
    label: "提前几天提醒",
    field: "提前几天提醒",
    component: "DatePicker",
    span: 12,
    componentProps: {
      maxlength: 50,
      style: { width: "100%" },
      placeholder: "请输入提前几天提醒",
    },
  },
  {
    label: "地市",
    field: "ConfSmsRegion",
    component: "Select",
    span: 12,
    componentProps: {
      maxlength: 50,
      style: { width: "100%" },
      placeholder: "请选择地市",
      options: d1,
    },
  },
  {
    label: "限制产品",
    field: "ConfSmsProd",
    component: "DatePicker",
    span: 12,
    componentProps: {
      maxlength: 50,
      style: { width: "100%" },
      placeholder: "请输入限制产品",
    },
  },
  {
    label: "短信下发时间",
    field: "短信下发时间",
    component: "DatePicker",
    span: 12,
    componentProps: {
      maxlength: 50,
      style: { width: "100%" },
      placeholder: "请选择短信下发时间",
    },
  },
]);
export const rules6 = {
  ConfSmsCont: [
    {
      required: true,
      message: "请输入短信内容",
      trigger: "blur",
    },
  ],
};

export const config7 = ref([
  {
    label: "是否参与渠道费用结算",
    field: "IsChouJin",
    component: "RadioGroup",
    span: 12,
    componentProps: {
      maxlength: 50,
      style: { width: "100%" },
      placeholder: "请选择是否参与渠道费用结算",
      options: [
        { label: "是", value: "0" },
        { label: "否", value: "1" },
      ],
    },
  },
  {
    label: "是否按实收账单结酬",
    field: "IsShiShou",
    component: "RadioGroup",
    span: 12,
    componentProps: {
      maxlength: 50,
      style: { width: "100%" },
      placeholder: "请选择是否按实收账单结酬",
      options: [
        { label: "是", value: "是" },
        { label: "否", value: "否" },
      ],
    },
  },
  {
    label: "结算业务包",
    field: "ChouJinBao",
    component: "Input",
    span: 24,
    componentProps: {
      maxlength: 50,
      type: "textarea",
      rows: 4,
      style: { width: "100%" },
      placeholder: "请输入结算业务包",
    },
  },
]);
export const rules7 = {
  IsChouJin: [
    {
      required: true,
      message: "请选择是否参与渠道费用结算",
      trigger: "blur",
    },
  ],
};

export const config8 = ref([
  {
    label: "是否业务拆分",
    field: "是否业务拆分",
    component: "RadioGroup",
    span: 12,
    componentProps: {
      maxlength: 50,
      style: { width: "100%" },
      placeholder: "请选择是否业务拆分",
      options: [
        { label: "是", value: "是" },
        { label: "否", value: "否" },
      ],
    },
  },
  {
    label: "是否新增账目",
    field: "是否新增账目",
    component: "RadioGroup",
    span: 12,
    componentProps: {
      maxlength: 50,
      style: { width: "100%" },
      placeholder: "请选择是否新增账目",
      options: [
        { label: "是", value: "是" },
        { label: "否", value: "否" },
      ],
    },
  },
  {
    label: "是否定义个性化账单名称",
    field: "IsBillName",
    component: "Input",
    span: 24,
    componentProps: {
      maxlength: 50,
      type: "textarea",
      rows: 4,
      style: { width: "100%" },
      placeholder: "请输入是否定义个性化账单名称",
    },
  },
]);
export const rules8 = {
  是否业务拆分: [
    {
      required: true,
      message: "请选择是否业务拆分",
      trigger: "blur",
    },
  ],
};

export const config9 = ref([
  {
    label: "档次编码",
    field: "档次编码",
    component: "Input",
    span: 12,
    componentProps: {
      maxlength: 50,
      style: { width: "100%" },
      placeholder: "请输入档次编码",
    },
  },
  {
    label: "档次名称",
    field: "档次名称",
    component: "Input",
    span: 12,
    componentProps: {
      maxlength: 50,
      style: { width: "100%" },
      placeholder: "请输入档次名称",
    },
  },
  {
    label: "账单显示名称",
    field: "账单显示名称",
    component: "Input",
    span: 12,
    componentProps: {
      maxlength: 50,
      style: { width: "100%" },
      placeholder: "请输入账单显示名称",
    },
  },
  {
    label: "预存金额(元)",
    field: "预存金额",
    component: "Input",
    span: 12,
    componentProps: {
      maxlength: 50,
      style: { width: "100%" },
      placeholder: "请输入预存金额(元)",
    },
  },
  {
    label: "预存分摊(月)",
    field: "预存分摊",
    component: "Input",
    span: 12,
    componentProps: {
      maxlength: 50,
      style: { width: "100%" },
      placeholder: "请输入预存分摊(月)",
    },
  },
  {
    label: "每月返还金额",
    field: "每月返还金额",
    component: "Input",
    span: 12,
    componentProps: {
      maxlength: 50,
      style: { width: "100%" },
      placeholder: "请输入每月返还金额",
    },
  },
  {
    label: "月保底(月)",
    field: "月保底",
    component: "Input",
    span: 12,
    componentProps: {
      maxlength: 50,
      style: { width: "100%" },
      placeholder: "请输入月保底(月)",
    },
  },
  {
    label: "协议期(月)",
    field: "协议期",
    component: "Input",
    span: 12,
    componentProps: {
      maxlength: 50,
      style: { width: "100%" },
      placeholder: "请输入协议期(月)",
    },
  },

  {
    label: "协议期是否积分",
    field: "协议期是否积分",
    component: "RadioGroup",
    span: 12,
    componentProps: {
      maxlength: 50,
      style: { width: "100%" },
      placeholder: "请选择协议期是否积分",
      options: [
        { label: "是", value: "是" },
        { label: "否", value: "否" },
      ],
    },
  },
  {
    label: "是否允许0000查询退订",
    field: "是否允许0000查询退订",
    component: "RadioGroup",
    span: 12,
    componentProps: {
      maxlength: 50,
      style: { width: "100%" },
      placeholder: "请选择是否允许0000查询退订",
      options: [
        { label: "是", value: "是" },
        { label: "否", value: "否" },
      ],
    },
  },
  {
    label: "违约金金额(元)",
    field: "违约金金额",
    component: "Input",
    span: 12,
    componentProps: {
      maxlength: 50,
      tppe: "textarea",
      rows: 4,
      style: { width: "100%" },
      placeholder: "请输入违约金金额(元)",
    },
  },
  {
    label: "资费描述",
    field: "资费描述",
    component: "Input",
    span: 24,
    componentProps: {
      maxlength: 50,
      type: "textarea",
      rows: 8,
      style: { width: "100%" },
      placeholder: "请输入资费描述",
    },
  },
]);

export const rules9 = {
  档次编码: [
    {
      required: true,
      message: "请输入档次编码",
      trigger: "blur",
    },
  ],
  档次名称: [
    {
      required: true,
      message: "请输入档次名称",
      trigger: "blur",
    },
  ],
  预存金额: [
    {
      required: true,
      message: "请输入预存金额",
      trigger: "blur",
    },
  ],
  预存分摊: [
    {
      required: true,
      message: "请输入每月返还金额",
      trigger: "blur",
    },
  ],
  每月返还金额: [
    {
      required: true,
      message: "请输入每月返还金额",
      trigger: "blur",
    },
  ],
  资费描述: [
    {
      required: true,
      message: "请输入每月返还金额",
      trigger: "blur",
    },
  ],
  协议期内是否积分: [
    {
      required: true,
      message: "请输入每月返还金额",
      trigger: "blur",
    },
  ],
  是否允许0000查询退订: [
    {
      required: true,
      message: "请输入每月返还金额",
      trigger: "blur",
    },
  ],
  违约金金额: [
    {
      required: true,
      message: "请输入每月返还金额",
      trigger: "blur",
    },
  ],
};

export const mapping0 = [
  "产品编码",
  "是否包含流量资源",
  "产品名称",
  "推广地区",
  "方案类型",
  "活动开始时间",
  "活动结束时间",
  "支撑方式",
  "是否总部统一需求",
  "需承载渠道",
  "是否限定工号组受理",
  "是否限定工号受理",
  "受理工号",
  "是否限定目标客户",
  "是否要求合户",
  "产品类型",
  "资费归属",
  "对应总部一级编码",
  "需求编号",
  "日租计费价格",
  "是否要求合户",
  "是否日租产品",
  "终端活动类型",
  "是否网龄限制",
  "网龄限制时长",
  "优惠模式",
  "折扣类型",
  "是否需要接盘",
  "负责部门",
  "促销类型及到期规则",
  "员工是否可办理",
  "申请统一产商品编码",
  "工号组选择",
];

export const mapping1 = ["办理", "默认", "取消"];

export const mapping2 = ["产品发布"];
export const mapping3 = [
  "违约金支付方式",
  "合约期",
  "合约星级",
  "违约比例",
  "携出违约信息选择",
];
export const mapping4 = ["短信"];
export const mapping5 = ["短信"];
export const mapping6 = ["短信"];
export const mapping7 = ["是否参与渠道费用结算"];
export const mapping8 = ["是否业务拆分"];
export const mapping9 = [
  "档次编码",
  "档次名称",
  "预存金额",
  "预存分摊",
  "每月返还金额",
  "是否允许0000查询退订",
  "资费描述",
  "违约金金额",
];
